package com.nineclock.system.controller;

import com.nineclock.common.entity.Result;
import com.nineclock.system.pojo.SysCompanyUser;
import com.nineclock.system.service.OrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yangchao
 * @create 2022-01-14 14:29
 **/
@RestController
@RequestMapping("/organization")
public class OrganizationController {

    @Autowired
    private OrganizationService organizationService;

    /**
     * 查询当前用户企业所有员工的列表
     */
    @GetMapping("/members/simple")
    public Result selectOrganizationMemberList(){

        List<SysCompanyUser> sysCompanyUsers = organizationService.selectOrganizationMemberList();

        return Result.success(sysCompanyUsers);
    }

}
